CREATE TABLE [dbo].[TDAMAR_OCPR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDAMAR_OC__NU_SE__65C116E7] DEFAULT ((0)),
[CO_TIDO_DEST] [dbo].[TD_VC_003] NULL,
[NU_DOCU_DEST] [dbo].[TD_VC_020] NULL,
[IM_PAGO_DEST] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_PA__66B53B20] DEFAULT ((0)),
[IM_SALD_DEST] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_SA__67A95F59] DEFAULT ((0)),
[CO_TIDO_ORIG] [dbo].[TD_VC_003] NULL,
[IM_PAGO_CDES] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_PA__689D8392] DEFAULT ((0)),
[NU_DOCU_ORIG] [dbo].[TD_VC_020] NULL,
[IM_SALD_CDES] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_SA__6991A7CB] DEFAULT ((0)),
[IM_PAGO_ORIG] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_PA__6A85CC04] DEFAULT ((0)),
[IM_SALD_ORIG] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_SA__6B79F03D] DEFAULT ((0)),
[CO_EMPR_BANC] [dbo].[TD_VC_002] NULL,
[CO_BANC] [dbo].[TD_VC_003] NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NULL,
[AA_BNCO] [dbo].[TD_VC_004] NULL,
[MM_BNCO] [dbo].[TD_VC_002] NULL,
[TI_MOVI] [dbo].[TD_VC_001] NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NULL,
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDAMAR_OC__ST_CI__6C6E1476] DEFAULT ('N'),
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[TI_CAMB] [dbo].[TD_NU_015_006] NULL,
[IM_PAGO_CORI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_PA__6E565CE8] DEFAULT ((0)),
[IM_SALD_CORI] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDAMAR_OC__IM_SA__6F4A8121] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_OC__CO_US__703EA55A] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_OC__FE_US__7132C993] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_OC__CO_US__7226EDCC] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_OC__FE_US__731B1205] DEFAULT (getdate()),
[TI_MOVI_OPER] [dbo].[TD_VC_001] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[CO_AUXI_EMPR] [dbo].[TD_VC_020] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_OCPR] WITH NOCHECK ADD CONSTRAINT [CK__TDAMAR_OC__ST_CI__6D6238AF] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDAMAR_OCPR] ADD CONSTRAINT [PK__TDAMAR_O__F88147646AD0B01E] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_OCPR] ADD CONSTRAINT [FK__TDAMAR_OCPR__25DC6753] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TCAMAR_OCPR] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
